import React, { Component } from 'react'

import { 
  BrowserRouter as Router,
  Route,
  Switch,
  Link
} from 'react-router-dom'
import Location from 'images/home/dizhi@3x.png'
import More from 'images/home/gengduo@3x.png'
import Search from 'images/home/ss.png'
import Info from 'images/home/xiaoxi@3x.png'
import {
    NavContainer
} from '../../StyledHome'

import InfoBox from '../../childView/InfoBox'

export default class NavRouter extends Component {
  
     
    render() {
     
        return (
            <NavContainer>
                <header>
                  <div className="header-icon">
                      <div>
                         <Link to='/homeChildRouter/reChooseLocationL'>
                              <img className="location" src={Location} onClick={this.locationChange} alt=""/>
                         </Link>
                          <span>选择地址</span>
                          <Link to='/homeChildRouter/reChooseLocationR'>
                              <img className="more" src={More} onClick={this.moreChange} alt=""/>
                          </Link>
                        </div> 
                    <div >
                        <Link to='/homeChildRouter/search'>
                            <img className="search" src={Search} onClick={this.searchChange} alt=""/>
                        </Link>
                        <Link to="/homeChildRouter/infoBox">
                            <img className="info" src={Info} onClick={this.infoChange} alt=""/>
                        </Link>
                    </div>
                  </div>
                </header>
            </NavContainer>
        )
    }
    componentDidMount(){}
     

    locationChange(){
      console.log("定位")
    }
    moreChange(){
      console.log("更多定位")
    }
    searchChange(){
      console.log("搜索框")
    }
    infoChange(){
      console.log("消息盒子")
    }



}
